package com.dianjing.dianqun.dao.dianpai;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.dianjing.dianqun.common.base.CrudMpper;
import com.dianjing.dianqun.model.DianPaiContentComment;

public interface DianPaiContentCommentMapper extends CrudMpper<DianPaiContentComment>{
    /**
     *
     * @mbggenerated 2017-10-23
     */
    int deleteByPrimaryKey(Integer commentId);

    /**
     *
     * @mbggenerated 2017-10-23
     */
    int insert(DianPaiContentComment record);

    /**
     *
     * @mbggenerated 2017-10-23
     */
    int insertSelective(DianPaiContentComment record);

    /**
     *
     * @mbggenerated 2017-10-23
     */
    DianPaiContentComment selectByPrimaryKey(Integer commentId);

    /**
     *
     * @mbggenerated 2017-10-23
     */
    int updateByPrimaryKeySelective(DianPaiContentComment record);

    /**
     *
     * @mbggenerated 2017-10-23
     */
    int updateByPrimaryKey(DianPaiContentComment record);

    /**
     * 根据点拍文章id 查询最多3条评论 最新的
     * 用户id  查询字就可以见的
     * @param contentId
     * @return
     */
	List<DianPaiContentComment> select3ByContentId(@Param("contentId")Integer contentId,@Param("userId")Integer userId);

	/**
	 * 分页查询 点拍对应的评论
	 * @param contentId
	 * @param userId 
	 * @return
	 */
	List<DianPaiContentComment> selectByContentId(@Param("contentId")Integer contentId, @Param("userId")Integer userId);

	List<DianPaiContentComment> findAllComment();

	void chckedAll();

	Integer selectCountByConetnetId(@Param("contentId")Integer contentId, @Param("userId")Integer userId);
}